#include "StdAfx.h"
#include ".\tempuser.h"
#include "UserFactory.h"
#include "UserManager.h"
#include "WaitingUserList.h"
#include "Channel.h"
#include "ChannelManager.h"
#include "packetstruct_Cp.h"
#include "PacketHandler.h"
#include "Packet.h"
#include "PacketFactory.h"
#include "PacketCreator.h"
TempUser::TempUser(void)
{
	
}

TempUser::~TempUser(void)
{
}

VOID TempUser::Init()
{
	User::Init();
	m_bFistTime = TRUE;
	m_bAuthed   = FALSE;
}


VOID TempUser::OnAccept( DWORD dwNetworkIndex )
{
	
	Packet *pSendMsg = PacketCreator::HelloCommand();
	Send(pSendMsg->getBuff(),pSendMsg->getSize());
	PacketFactory::Instance()->Free(pSendMsg);
}

VOID TempUser::OnRecv( BYTE *pMsg, WORD wSize )
{   
      
	if( !PacketHandler::Instance()->ParsePacket_CP( this, (MSG_BASE *)pMsg, wSize ) )
	{
		//Logout();
	}

 
}